package cn.zifangsky.jvm.part2.threadlocal.demo2;

import cn.zifangsky.jvm.part2.threadlocal.ThreadContext;

import java.util.Map;

/**
 * 处理数据
 *
 * @author zifangsky
 * @date 2020/7/11
 * @since 1.0.0
 */
public class Handle {

    /**
     * 模拟业务逻辑处理
     */
    public void handle(){
        Map<String, Object> resources = ThreadContext.getResources();

        resources.forEach((key, value) -> {
            System.out.println(String.format("处理用户[id=%s]的数据，结果：%s", key, value));
        });
    }

}
